//Refer <<Interview Difference between heap and stack>>
#include <iostream>

using namespace std ;

int main ()
{
    int a, b ;
    int c ;

    int *pA = new int ;
    int *pB = new int ;

    cout<< "&a=" << &a << endl //Stack expands to low address
        << "&b=" << &b << endl
        << "&c=" << &c<< endl
        << "pA=" << pA<< endl  //Heap expands to high address
        << "pB=" << pB<< endl ;
/*
 * &a=0xbfe80018
 * &b=0xbfe80014
 * &c=0xbfe80010
 * pA=0x8a0d008
 * pB=0x8a0d018
 */
    return 0 ;
}
